/**
 * Created by chenyong on 2015/2/12.
 */

var mongoose = require('mongoose'),
    Schema = mongoose.Schema;

var OptionSchema = new Schema({
    option_name:String,
    option_value:String
});

//根据Option_name查询
OptionSchema.statics.findbyname = function(optionname, callback) {
    return this.model('Option').findOne({option_name: optionname}, callback);
}

module.exports = mongoose.model('Option', OptionSchema);
